<html>
<body>
Reports calls from Kotlin to <code>values()</code> method in enum classes that can be replaced with <code>entries</code> property read.
<p>
    Use of <code>Enum.entries</code> may improve performance of your code.
</p>
<p>
    The quick-fix replaces <code>values()</code> with <code>entries</code>.
</p>
<p>
    <b>More details:</b> <a href="https://youtrack.jetbrains.com/issue/KT-48872">
    KT-48872 Provide modern and performant replacement for Enum.values()</a>
</p>
<p>
    <b>Note:</b> <code>entries</code> property type is different from the return type of <code>values()</code> method
    (<code>EnumEntries&lt;T&gt;</code> which inherits from <code>List&lt;T&gt;</code> instead of <code>Array&lt;T&gt;</code>).
    Due to this in some cases quick fix inserts extra <code>.toTypedArray()</code> conversion to not break the code, but
    for most common cases replacement will be done without it (e.g. in <code>for</code> loop).
</p>
<p><b>Example:</b></p>
<pre><code>
    enum class Version {
        V1, V2
    }

    Version.<b>values()</b>.forEach { /* .. */ }
    val firstVersion = Version.<b>values()</b>[0]
    functionExpectingArray(Version.<b>values()</b>)
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
    enum class Version {
        V1, V2
    }

    Version.<b>entries</b>.forEach { /* .. */ }
    val firstVersion = Version.<b>entries</b>[0]
    functionExpectingArray(Version.<b>entries.toTypedArray()</b>)
</code></pre>
</body>
</html>
